(enable-and-notify) Added. Inspired by Roland McGrath's LCD package
authorEric S. Raymond <esr@snark.thyrsus.com>
Sat, 27 Mar 1993 01:58:24 +0000 (01:58 +0000)
committerEric S. Raymond <esr@snark.thyrsus.com>
Sat, 27 Mar 1993 01:58:24 +0000 (01:58 +0000)
enable-me.

lisp/novice.el

index 2ddbbac325052bd2df0d34a242220be1d2071ba9..28ba34d206f0d63b30a55ad44933b775a503980c 100644 (file)
@@ -120,4 +120,13 @@ to future sessions."
    (insert "(put '" (symbol-name command) " 'disabled t)\n")
    (save-buffer)))
 
+;;;###autoload
+(defun enable-and-notify (&rest args)
+  "A novice hook for non-novices."
+  (put this-command 'disabled nil)
+  (message "You typed %s.  %s was disabled.  It's enabled now."
+          (key-description (this-command-keys)) this-command)
+  (sit-for 0)
+  (call-interactively this-command))
+
 ;;; novice.el ends here